package invalidcomponentgeneralization;

import invalidcomponentgeneralization.InvalidComponentGeneralizationMatch;
import org.eclipse.viatra2.emf.incquery.runtime.api.IMatchProcessor;
import sysmodel.BusinessComponent;
import sysmodel.RestComponent;

/**
 * A match processor tailored for the InvalidComponentGeneralization pattern.
 * 
 * Clients should derive an (anonymous) class that implements the abstract process().
 * 
 */
public abstract class InvalidComponentGeneralizationProcessor implements IMatchProcessor<InvalidComponentGeneralizationMatch> {
  /**
   * Defines the action that is to be executed on each match.
   * @param pComponent1 the value of pattern parameter component1 in the currently processed match 
   * @param pComponent2 the value of pattern parameter component2 in the currently processed match 
   * 
   */
  public abstract void process(final RestComponent component1, final BusinessComponent component2);
  
  @Override
  public void process(final InvalidComponentGeneralizationMatch match) {
    process(match.getComponent1(), match.getComponent2());  				
    
  }
}
